package com.hera.process.config.rest.delegate;

import java.util.List;
import java.util.Map;

import com.hera.base.util.FiltroDTO;
import com.hera.process.form.domain.FormField;
import com.hera.process.workflow.domain.ProcInstancHistory;
import com.hera.process.workflow.domain.ProcInstancNote;
import com.hera.process.workflow.domain.Process;
import com.hera.process.workflow.domain.ProcessCategory;
import com.hera.process.workflow.domain.ProcessGroup;
import com.hera.process.workflow.domain.ProcessGroupUser;
import com.hera.process.workflow.domain.ProcessInstance;
import com.hera.process.workflow.domain.ProcessSupervisor;
import com.hera.process.workflow.domain.Stage;
import com.hera.process.workflow.domain.StageRollup;
import com.hera.process.workflow.domain.StageUser;
import com.hera.process.workflow.domain.Swimlane;
import com.hera.process.workflow.domain.TaskInstanceCache;
import com.hera.process.workflow.domain.TaskUser;

public interface WorkflowDelegate {
	
	//////////////////////PROCESSCATEGORY////////////////////////////////////////
	public List<ProcessCategory> findAllProcessCategories(FiltroDTO filtroDTO);
	public ProcessCategory createProcessCategory(ProcessCategory procategpry);
	public ProcessCategory updateProcessCategory(ProcessCategory procategory);
	public void deleteProCategory(ProcessCategory procategory);
	
	//////////////////////PROCESS //////////////////////////////////////////////
	public List<Process> findAllProcesses(FiltroDTO filtroDTO);
	public Process createProcess(Process process);
	public Process updateProcess(Process process);
	public void deleteProcess(Process process);
	public void publicarProceso(Process process);
	public boolean validarProceso(Process process);
	public List<FormField> findAllFormFieldInProcess(Process process);
	
	//////////////////////PROCESS GROUP//////////////////////////////////////////////
	public List<ProcessGroup> findAllProcessGroups(FiltroDTO filtroDTO);
	public ProcessGroup createProcessGroup(ProcessGroup processgroup);
	public ProcessGroup updateProcessGroup(ProcessGroup processgroup);
	public void deleteProcessgroup(ProcessGroup processgroup);
	
	///////////////////PROCESSGROUP USER//////////////////////////////////////////////
	public List<ProcessGroupUser> findAllProcessGroupUsers(FiltroDTO filtroDTO);
	public ProcessGroupUser createProcessGroupUser(ProcessGroupUser progrouser);
	public ProcessGroupUser updateProcessGroupUser(ProcessGroupUser progrouser);
	public void deleteProcessGroupUser(ProcessGroupUser progrouser);
	
	///////////////////PROCESS INSTANCE//////////////////////////////////////////////
	public List<ProcessInstance> findAllProcessInstances(FiltroDTO filtroDTO);
	public ProcessInstance createProcessInstance(ProcessInstance proinstance);
	public ProcessInstance updateProcessInstance(ProcessInstance proinstance);
	public void deleteProcessInstance(ProcessInstance proinstance);
	
	///////////////////PROCESS SUPERVISOR////////////////////////////////////////////
	public List<ProcessSupervisor> findAllProcessSupervisors(FiltroDTO filtroDTO);
	public ProcessSupervisor createProcessSupervisor(ProcessSupervisor prosuper);
	public ProcessSupervisor updateProcessSupervisor(ProcessSupervisor prosuper);
	public void deleteProcessSupervisor(ProcessSupervisor prosuper);
	
	///////////////////PROCESS INSTANC HISTORY////////////////////////////////////////////
	public List<ProcInstancHistory> findAllProceInstancHistories(FiltroDTO filtroDTO);
	public ProcInstancHistory createProceHistory(ProcInstancHistory prohisto);
	public ProcInstancHistory updateProcesHistory(ProcInstancHistory prohisto);
	public void deleteProInstanceHistory(ProcInstancHistory prohisto);
	
	///////////////////PROCESS INSTANC NOTE////////////////////////////////////////////
	public List<ProcInstancNote> findAllProceInstancNotes(FiltroDTO filtroDTO);
	public ProcInstancNote createProcInstancNote(ProcInstancNote pronote);
	public ProcInstancNote updateProcInstancNote(ProcInstancNote pronote);
	public void deleteProcInstancNote(ProcInstancNote pronote);
	
	
	//////////////////////STAGE //////////////////////////////////////////////
	public List<Stage> findAllStages(FiltroDTO filtroDTO);
	public Stage createStage(Stage stage);
	public Stage updatedStage(Stage stage);
	public void deleteStage(Stage stage);
	public List<Stage> findStageByProcessId(Stage stage);
	public List<Stage> findStageByProcessIdandTypeId(Stage stage);
	public List<Stage> findStageByProcessAndIdDiagram(Stage stage);
	public ProcessInstance createInstanceProcess(Map<String, Object> entity);
	public ProcessInstance udpateInstanceProcess(Map<String, Object> entity);
	
	//////////////////////STAGEROLLUP //////////////////////////////////////////////
	public List<StageRollup> findAllStageRollups(FiltroDTO filtroDTO);
	public StageRollup createStageRollup(StageRollup stagerollup);
	public StageRollup updatedStageRollup(StageRollup stagerollup);
	public void deleteStageRollup(StageRollup stagerollup);
	public List<StageRollup> findStageRollupByProcessId(Long idProcess);
	public List<StageRollup> findStageRollupByProcessAndIdDiagram(StageRollup stagerollup);
	
	//////////////////////STAGEUSER //////////////////////////////////////////////
	public List<StageUser> findAllStageUsers(FiltroDTO filtroDTO);
	public StageUser createStageUser(StageUser stageuser);
	public StageUser updatedStageUser(StageUser stageuser);
	public void deleteStageUser(StageUser stageuser);
	public List<StageUser> findStageUserByStage(Stage stage);
	
	//////////////////////SWIMLANE //////////////////////////////////////////////
	public List<Swimlane> findAllSwimlanes(FiltroDTO filtroDTO);
	public Swimlane createSwimlane(Swimlane swimlane);
	public Swimlane updatedSwimlane(Swimlane swimlane);
	public void deleteSwimlane(Swimlane swimlane);
	public List<Swimlane> findSwimlaneByProcessId(Long idProcess);
	//////////////////////TASKINSTANCECACHE //////////////////////////////////////////////
	public List<TaskInstanceCache> findAllTaskInstanceCaches(FiltroDTO filtroDTO);
	public TaskInstanceCache createTaskInstanceCache(TaskInstanceCache taskcache);
	public TaskInstanceCache updatedTaskInstanceCache(TaskInstanceCache taskcache);
	public void deleteTaskInstanceCache(TaskInstanceCache taskcache);
	
	//////////////////////TASK USER //////////////////////////////////////////////
	public List<TaskUser> findBandejaUsuario(Long codigoJefe);
	public List<TaskUser> findAllTaskUsers(FiltroDTO filtroDTO);
	public TaskUser createTaskUser(TaskUser taskuser);
	public TaskUser updatedTaskUser(TaskUser taskuser);
	public void deleteTaskUser(TaskUser taskuser);
}
